<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="generator" content="PHPDoctor 2RC4 (http://peej.github.com/phpdoctor/)">
<meta name="when" content="Mon, 02 May 2011 02:46:56 +0000">

<link rel="stylesheet" type="text/css" href="../stylesheet.css">
<link rel="start" href="../overview-summary.html">

<title>response.php (Cornice)</title>

</head>
<body id="file" onload="parent.document.title=document.title;">

<div class="header">
<h1>Cornice</h1>
<ul>
<li><a href="../overview-summary.html">Overview</a></li>
<li>Package</li><li>Class</li><li>Tree</li><li><a href="../overview-files.html">Files</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../todo-list.html">Todo</a></li>
<li><a href="../index-all.html">Index</a></li>
</ul>
</div>

<div class="small_links">
<a href="../index.html" target="_top">Frames</a>
<a href="../source\response.php.html" target="_top">No frames</a>
</div>
<hr>

<h1>response.php</h1>
<div class="comment" id="overview_description"><p>============================================================================
Cornice PHP Framework & Website Builder
Freeware (f) 2011 by Inforo Software & Computer
============================================================================</p></div>

<hr>

<a name="line1"></a><pre><?php
<a name="line2"></a>/**
<a name="line3"></a> *============================================================================
<a name="line4"></a> * Cornice PHP Framework & Website Builder
<a name="line5"></a> * Freeware (f) 2011 by Inforo Software & Computer
<a name="line6"></a> *============================================================================
<a name="line7"></a> */
<a name="line8"></a> 
<a name="line9"></a>/**
<a name="line10"></a> * Class processing HTTP response
<a name="line11"></a> * @author Nicola Dinh
<a name="line12"></a> * @version 2011.04.2217
<a name="line13"></a> */
<a name="line14"></a>class response {
<a name="line15"></a>
<a name="line16"></a>  /**
<a name="line17"></a>   * Default instance level constructor
<a name="line18"></a>   * Just decorative, should not be called due to having only static methods
<a name="line19"></a>   */
<a name="line20"></a>  public function __construct() {
<a name="line21"></a>    //
<a name="line22"></a>  }
<a name="line23"></a>  
<a name="line24"></a>  /**
<a name="line25"></a>   * Dump object to browser within 'pre' tags
<a name="line26"></a>   * @param string $object The object to dump to browser
<a name="line27"></a>   */
<a name="line28"></a>  public static function dump($object) {
<a name="line29"></a>    echo "<pre style='text-align:left;'>";
<a name="line30"></a>    var_dump($object);
<a name="line31"></a>    echo "</pre>";
<a name="line32"></a>  }
<a name="line33"></a>  
<a name="line34"></a>  /**
<a name="line35"></a>   * Print an error message
<a name="line36"></a>   * @param string $error_msg The error message
<a name="line37"></a>   */
<a name="line38"></a>  public static function error($error_msg) {  
<a name="line39"></a>    print_error($error_msg);
<a name="line40"></a>  }
<a name="line41"></a>  
<a name="line42"></a>  /** 
<a name="line43"></a>   * Redirect to some URL, all data in POST & GET will be lost
<a name="line44"></a>   * @param string $url The relative or absolute URl to redirect to
<a name="line45"></a>   */
<a name="line46"></a>  public static function redirect_to($url) {
<a name="line47"></a>    system::break_all_buffers();
<a name="line48"></a>    $url = str_replace("\"","",$url);
<a name="line49"></a>    echo("
<a name="line50"></a>      <script>
<a name="line51"></a>      top.location = \"$url\";
<a name="line52"></a>      </script>
<a name="line53"></a>    ");
<a name="line54"></a>    exit;
<a name="line55"></a>  }
<a name="line56"></a>}</pre>
<div class="header">
<h1>Cornice</h1>
<ul>
<li><a href="../overview-summary.html">Overview</a></li>
<li>Package</li><li>Class</li><li>Tree</li><li><a href="../overview-files.html">Files</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../todo-list.html">Todo</a></li>
<li><a href="../index-all.html">Index</a></li>
</ul>
</div>

<div class="small_links">
<a href="../index.html" target="_top">Frames</a>
<a href="../source\response.php.html" target="_top">No frames</a>
</div>
<hr>

<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>

</body>

</html>